/*
 * =====================================================================================
 *
 *       Filename:  USBDES.H
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2010-2-10 8:39:59
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (), 
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef  USBDESCFG_INC
#define  USBDESCFG_INC

#define	DEVDES_LEN             (0x12)			/*  */
#define	DEVDES_TYPENUM         0x01			/*  */
#define	USBVERL                0x10			/*  */
#define	USBVERH                0x01			/*  */
#define	DEVDES_DEVCLASS        0x00			/*  */
#define	DEVDES_DEVSUBCLASS        0x00			/*  */
#define	DEVDES_DEVPROTO        0x00			/*  */
#define	DEVDES_MAXPACKETSZ0     0x10			/*  */
#define	VENDER_IDL        0x44			/*  */
#define	VENDER_IDH        0x45			/*  */
#define	DEV_IDL      0x05			/*  */
#define	DEV_IDH      0x00			/*  */
#define	DEV_VERL        0x00			/*  */
#define	DEV_VERH        0x01			/*  */
#define	VENDER_STRIDX        0x01			/*  */
#define	DEV_STRIDX        0x02			/*  */
#define	SN_STRIDX             0x03			/*  */
#define	CFGMAX               0x01			/*  */



/*-----------------------------------------------------------------------------
 *  Configuration Descriptor define
 *-----------------------------------------------------------------------------*/
#define	CFGDES_LEN           (0x09)			/*  */
#define	CFGDES_TYPENUM		(0x02)	/*  */
#define	CFGDES_ITFMAX		(0x02)	/*接口数量  */
#define	CFGDES_CFGVALUE		(0x01)	/**/
#define	CFGDES_STRIDX		(0x00)	/**/
#define	CFGDES_PWRES		(0x80)	/*reserved bit Must to 1*/
#define	CFGDES_PWSELF		(0x40)	/*自供电*/
#define	CFGDES_PWRWU         (0x20)	/*REMOTE WAKEUP*/
#define	CFGDES_CURRMAX         (100)	/*REMOTE WAKEUP*/

/*-----------------------------------------------------------------------------
 *  Interface Descriptor define
 *-----------------------------------------------------------------------------*/
#define	ITFDES_LEN      (0x09)			/*  */
#define	ITFDES_TYPENUM      (0x04)			/*  */
#define	ITFDES_NUM    (0x00)		/*接口编号  */
#define	ITFDES_ALTERNUM    (0x00)		/*备用接口编号  */
#define	ITFDES_EPMAX      (0x02)			/*  非0 端点数*/
#define	ITFDES_CLASS_HID  (0x03)			/*  */
#define	ITFDES_SUBCLASS_BOOT  (0x01)			/*  */
#define	ITFDES_PROTOCOL_MOUSE  (0x02)			/*  */
#define	ITFDES_PROTOCOL_KEYBRD (0x01)			/*  */
#define	ITFDES_STRIDX           (0x00)			/*  */



/*-----------------------------------------------------------------------------
 *  HID Descriptor define
 *-----------------------------------------------------------------------------*/
#define		HIDDES_LEN 		(0x09)		/*  */
#define		HIDDES_TYPENUM		(0x21)		/*  */
#define		HIDDES_VERL		(0x10)		/* HID协议版本 */
#define		HIDDES_VERH		(0x01)		/*  */
#define		HIDDES_COUNTY_USA 	(0x21)		/*  */
#define 	HIDDES_SUBDESMAX  	(0x01)		/*  */
#define 	HIDDES_SUBDESTYPENO  	(0x22)		/*  */

/*-----------------------------------------------------------------------------
 *  EndPoint Descriptor define
 *-----------------------------------------------------------------------------*/
#define		EPDES_LEN		(0x07)	/*  */
#define		EPDES_TYPENUM		(0x05)	/*  */
#define		EPDES_EPADDR		(0x01)	/*  */
#define		EPDES_EPDIRIN		(0x80)	/*  */
#define		EPDES_ATTR_CTLTR	(0x00)	/*  */
#define		EPDES_ATTR_ISOTR	(0x01)	/*  */
#define		EPDES_ATTR_BULKTR	(0x02)	/*  */
#define		EPDES_ATTR_INTTR	(0x03)	/*  */
#define		EPDES_MAXPACKETSZ1L     (0x10)	/*  */
#define		EPDES_MAXPACKETSZ1H     (0x00)	/*  */
#define		EPDES_INTERVAL		(0x0A)	/*  */

/*-----------------------------------------------------------------------------
 *  Interface Descriptor define
 *-----------------------------------------------------------------------------*/
#define		EPDES_OUT_LEN		(0x07)	/*  */

#endif   /* ----- #ifndef USBDESCFG_INC  ----- */

